/*
 * @Author: 袁十一
 * @Date: 2023-09-22 19:30:25
 * @LastEditTime: 2023-10-18 16:21:35
 * @LastEditors: Please set LastEditors
 * @Description:
 * @FilePath: \Vue3_admin_template\src\main.ts
 * 初心不变，意志坚定
 */
import { createApp } from 'vue'
import App from './App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import '@/styles/index.scss'
//@ts-expect-error忽略当前文件ts类型的检测否则有红色提示(打包会失败)
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import 'virtual:svg-icons-register'
import GlobalComponent from '@/components/index'
import router from './router'
import pinia from './store/index'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

const app = createApp(App)

app.use(ElementPlus, {
  locale: zhCn,
})
// 注册路由
app.use(router)
app.use(GlobalComponent)
app.use(pinia)
import './permisstion'
app.mount('#app')
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
